package com.buchong.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.buchong.mapper.Order_Item_Mapper;
import com.buchong.pojo.Order_item;
import com.buchong.service.OrderItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class OrderItemServiceImpl extends ServiceImpl<Order_Item_Mapper,Order_item> implements OrderItemService {
    @Autowired
    private Order_Item_Mapper order_item_mapper;
    @Override
    public List<Order_item> find(Integer id,Integer cid) {
        return order_item_mapper.finAll(id,cid);
    }

    @Override
    public int up(Order_item order_item) {
        return order_item_mapper.updateById(order_item);
    }

    @Override
    public int add(Order_item order_item) {
        return order_item_mapper.and(order_item);
    }


}
